﻿<UserControl x:Class="Bymed.SpineScan.WPF.CustomizedUserControl.TestResultReportHeaderUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="793.76">
    <Grid>
        <Grid.RowDefinitions>
            <!-- Report Title -->
            <RowDefinition Height="Auto" />
            <!-- Department Info -->
            <RowDefinition Height="Auto" />
            <!-- Patient Info -->
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid>
            <Grid>
                <Grid.ColumnDefinitions>
                    <!-- Logo -->
                    <ColumnDefinition Width="Auto" />
                    <!-- Report Name -->
                    <ColumnDefinition Width="Auto" />
                    <!-- Report Title -->
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Image Margin="10,0,0,0" Source="{Binding CompanyLogoFileFullName}" Height="45" />
                <StackPanel Grid.Column="1" Margin="10,0,0,0">
                    <TextBlock Text="{Binding CompanyName}" FontSize="18" />
                    <TextBlock Text="{Binding CompanyAddress}" />
                    <TextBlock Text="{Binding CompanyPhoneNumber}" />
                </StackPanel>
                <Image Grid.Column="2" Margin="0,0,10,0" Source="/Skins/Resource/Image/TestReportTitle.png" VerticalAlignment="Top" HorizontalAlignment="Right" Width="300" />
            </Grid>
        </Grid>
        <TextBlock Grid.Row="1" Text="{Binding DepartmentName, StringFormat={}科室：{0}}" Margin="12,0,0,0" Padding="6" Style="{StaticResource TestReportSmallTextBlock}" />
        <Border Grid.Row="2" Margin="10,0,10,0" Width="750" BorderThickness="1" BorderBrush="Black">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="1" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60" />
                        <ColumnDefinition />
                        <ColumnDefinition Width="60" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition Height="30" />
                        <RowDefinition Height="30" />
                    </Grid.RowDefinitions>
                    <Border Grid.ColumnSpan="4" Height="30" Background="{StaticResource TestReportMainBackgroundBrush}">
                        <TextBlock Text="被测者信息" FontSize="18" Style="{StaticResource TestReportTitleTextBlock}" />
                    </Border>
                    <Border Grid.Row="1" Background="{StaticResource TestReportSecondBackgroundBrush}" BorderBrush="Black" BorderThickness="0,0,1,1">
                        <TextBlock Text="编号" VerticalAlignment="Center" TextAlignment="Center" Style="{StaticResource TestReportSmallTextBlock}" />
                    </Border>
                    <Border Grid.Column="1" Grid.Row="1" BorderBrush="Black" BorderThickness="0,0,0,1">
                        <TextBlock Margin="3,0,0,0" Text="{Binding PatientBasicInfoDisplayViewModel.Number}" VerticalAlignment="Center" Style="{StaticResource TestReportSmallTextBlock}" />
                    </Border>
                    <Border Grid.Column="2" Grid.Row="1" Background="{StaticResource TestReportSecondBackgroundBrush}" BorderBrush="Black" BorderThickness="1,0,1,1">
                        <TextBlock Text="姓名" VerticalAlignment="Center" TextAlignment="Center" Style="{StaticResource TestReportSmallTextBlock}" />
                    </Border>
                    <Border Grid.Column="3" Grid.Row="1" BorderBrush="Black" BorderThickness="0,0,0,1">
                        <TextBlock Margin="3,0,0,0" Text="{Binding PatientBasicInfoDisplayViewModel.Name}" VerticalAlignment="Center" Style="{StaticResource TestReportSmallTextBlock}" />
                    </Border>
                    <Border Grid.Row="2" Background="{StaticResource TestReportSecondBackgroundBrush}" BorderBrush="Black" BorderThickness="0,0,1,0">
                        <TextBlock Text="生日" VerticalAlignment="Center" TextAlignment="Center" Style="{StaticResource TestReportSmallTextBlock}" />
                    </Border>
                    <Border Grid.Column="1" Grid.Row="2" BorderBrush="Black">
                        <TextBlock Margin="3,0,0,0" Text="{Binding PatientBasicInfoDisplayViewModel.BirthdayDisplay}" VerticalAlignment="Center" Style="{StaticResource TestReportSmallTextBlock}" />
                    </Border>
                    <Border Grid.Column="2" Grid.Row="2" Background="{StaticResource TestReportSecondBackgroundBrush}" BorderBrush="Black" BorderThickness="1,0,1,0">
                        <TextBlock Text="性别" VerticalAlignment="Center" TextAlignment="Center" Style="{StaticResource TestReportSmallTextBlock}" />
                    </Border>
                    <Border Grid.Column="3" Grid.Row="2" BorderBrush="Black">
                        <TextBlock Margin="3,0,0,0" Text="{Binding PatientBasicInfoDisplayViewModel.GenderDisplay}" VerticalAlignment="Center" Style="{StaticResource TestReportSmallTextBlock}" />
                    </Border>
                </Grid>
                <Border Grid.Column="1" Background="Black" />
                <Grid Grid.Column="2" VerticalAlignment="Top">
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Border Height="30" Background="{StaticResource TestReportMainBackgroundBrush}">
                        <TextBlock Text="备    注" FontSize="18" Style="{StaticResource TestReportTitleTextBlock}" />
                    </Border>
                    <TextBlock Grid.Row="1" Margin="2" Text="{Binding PatientBasicInfoDisplayViewModel.Remark}" TextWrapping="Wrap" Style="{StaticResource TestReportSmallTextBlock}" />
                </Grid>
            </Grid>
        </Border>
    </Grid>
</UserControl>
